package net;


import com.face.gaoml.netlibrary.data.rusult.BaseResult;
import com.modules.bean.User;

import java.util.ArrayList;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import rx.Observable;


/**
 * Created by gml on 16/12/9.
 */

public interface MyApiService {


    @FormUrlEncoded
    @POST("login")
    Observable<BaseResult<User>> login(@Field("country_code") String country_code, @Field("phone_number")
            String phone_number, @Field("password") String password);

    /**
     * 用户注册
     * @param country_code
     * @param phone_number
     * @param password
     * @return
     */
    @FormUrlEncoded
    @POST("regit")
    Observable<BaseResult<User>> regit(@Field("country_code") String country_code, @Field("phone_number")
            String phone_number, @Field("password") String password);

    @GET("findall")
    Observable<BaseResult<ArrayList<User>>> findall();
}
